/*
 * Copyright (c) 2015. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Chris
 */
public class Waiter {
    private List<Command> oders = new ArrayList<>();

    public void setOders(Command command) {
        oders.add(command);
    }

    public void cancel(Command command) {
        oders.remove(command);
    }

    public void notice() {
        for (Command cmd : oders) {
            cmd.Execute();
        }
    }
}
